/**
 * 
 */
package com.alphasystem.commerce.model.config;

import javax.persistence.Column;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

import com.alphasystem.commerce.common.model.AbstractEntity;
import com.alphasystem.commerce.model.config.folder.ConfigFolder;

/**
 * @author sali
 * 
 */
@MappedSuperclass
public abstract class AbstractConfiguration extends AbstractEntity {

	private static final long serialVersionUID = -767040741422144700L;

	protected String name;

	protected ConfigFolder folder;

	public AbstractConfiguration() {
		super();
	}

	public AbstractConfiguration(String id) {
		super(id);
	}

	/**
	 * @return the folder
	 */
	@ManyToOne
	@JoinColumn(name = "FOLDER_ID", nullable = false)
	public ConfigFolder getFolder() {
		return folder;
	}

	/**
	 * @return the name
	 */
	@Column(name = "NAME", length = 10, nullable = false)
	public String getName() {
		return name;
	}

	/**
	 * @param folder
	 *            the folder to set
	 */
	public void setFolder(ConfigFolder folder) {
		this.folder = folder;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

}
